home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / Mac F2C 1.3.1 / Test Project ƒ / MPW_Support / test.68K.CW.make next >
Encoding:
Text File  |  1996-02-25  |  2.1 KB  |  81 lines  |  [TEXT/MPS ]

  1. #   File:       test.68K.CW.make
  2. #   Target:     test.68K.CW
  3. #   Sources:    test.c
  4.  
  5. Makefile = :MPW_Support:test.68K.CW.make
  6.  
  7. object_folder = ":MPW_Support:objects_68K:"
  8. fsource =    test.f 
  9.  
  10. csource =    F2Cmain.c
  11.  
  12. fobjs     =    {object_folder}test.f.o  
  13.  
  14. cobjs    =    {object_folder}F2Cmain.c.o 
  15.  
  16.  
  17. objects =    {fobjs} ∂
  18.             {cobjs}
  19.  
  20. Segment.1        =    "{object_folder}F2Cmain.c.o" ∂
  21.                     "{object_folder}test.f.o"
  22.  
  23. Segment.2        =    "{MW68KLibraries}"MPWRuntime.68K.lib ∂
  24.                     "{MW68KLibraries}"MacOS.lib ∂
  25.                     "{MW68KLibraries}MPW ANSI (4i/8d) C.68K.Lib" ∂
  26.                     "{MW68KLibraries}MathLib68K (4i/8d).Lib" ∂
  27.                     "{MW68KLibraries}ToolLibs.o"
  28.  
  29. Segment.3        =    "{F2CLibraries}"libF77.68K ∂
  30.                     "{F2CLibraries}"libI77.68K
  31.  
  32. C            =    MWC68K
  33. COptions    =   -model far -align mac68k -intsize 4 -dsize 64 -d MPW_CW_F2C -w off
  34.  
  35. F2C            =    f2c
  36. F2COptions    =    -f -!i8 -A -a -E -ec -!R -r8 -w66
  37.  
  38. Link        =    MWLink68K
  39. LinkOptions    =    -d -c 'MPS ' -t 'MPST' -fastlink off -mpwtool -model far -intsize 4
  40. test.68K.CW  ƒƒ  {Makefile} {Objects}
  41.     {Link} {LinkOptions} ∂
  42.         -sb "Your Code"        -ra "Your Code"=resPreload,resProtected,resLocked ∂
  43.         {Segment.1} ∂
  44.         -sb "CW libs"        -ra "CW libs"=resProtected,resPurgeable ∂
  45.         {Segment.2} ∂
  46.         -sb "F2C libs"        -ra "F2C libs"=resProtected,resPurgeable ∂
  47.         {Segment.3} ∂
  48.         -o test.68K.CW
  49.  
  50. .f.o    ƒ    .f
  51.     {F2C} {F2COptions} {Default}.f     #compile the fortran and then compile the resulting C file.
  52.     setfile -t "TEXT" -c "MPS " {default}.c
  53.     {C} {default}.c {COptions} ∂
  54.     -o {targDir}{default}.f.o
  55.  
  56.  
  57. .c.o ƒ .c
  58.     {C} {default}.c {COptions} ∂
  59.     -o {targDir}{default}.c.o
  60.  
  61.  
  62. # If your FORTRAN code has common blocks add common.c.o to the cobjs list 
  63. # and then this rule should take care of it
  64. common.c    ƒ    {fobjs}
  65.     setfile -t "TEXT" -c "MPS " ?+_com.c
  66.     catenate ?+_com.c > {Targ}            #This puts all the common block files into one file for compiling.
  67.                                         #The wild card lets us add common blocks to the fortran code
  68.                                         #without having to change the makefile!  The common block files all
  69.                                         #end with _com.c
  70.  
  71. {objects}    ƒ    {Makefile}        #do a full rebuild if the makefile changes
  72.  
  73. {object_folder}    ƒ :
  74.  
  75. {object_folder}test.f.o  ƒ test.f
  76.             
  77. {object_folder}F2Cmain.c.o    ƒ F2Cmain.c
  78.  
  79. # makefile end
  80.  
  81.